from selenium.webdriver.common.by import By
from selenium import webdriver
import time
from .Base import Base

class Page1(Base):

    login_loc=(By.XPATH,'/html/body/div[2]/div/div[1]/div/a[1]')
    def login(self):
        self.click(self.login_loc)

    user_loc=(By.ID,'userName')
    def user(self):
        self.send_keys(self.user_loc,'13381144084')

    password_loc=(By.ID,'password')
    def password(self):
        self.send_keys(self.password_loc,'grq200566++')

    loginbtn_loc=(By.ID,'save')
    def loginbtn(self):
        self.click(self.loginbtn_loc)


    def luoji_jiuxian(self):
        self.open_url('https://login.jiuxian.com/')
        self.login()
        time.sleep(8)
        self.user()
        self.password()
        time.sleep(10)
        self.loginbtn()
